package com.superbytecode.cloud.example.web.dto;

import com.superbytecode.cloud.example.web.enums.LevelEnum;
import com.superbytecode.cloud.web.swagger.ModelPropertyEnum;
import com.superbytecode.cloud.web.transform.annotation.Transform;
import com.superbytecode.cloud.web.transform.annotation.TransformEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import java.util.List;

/**
 * All rights Reserved, Designed By www.super-master.com
 *
 * @ProjectName: beacon-cloud
 * @Package: com.superbytecode.cloud.example.web.dto
 * @ClassName: UserVo
 * @Description: []
 * <p> </p>
 * @Author: [Lance Ting]
 * @Date: 2024/10/22 16:50
 * @Version: V1.0
 * @Copyright: 2024 www.super-master.com Inc. All rights reserved.
 * TODO: 注意,本文件Lance Ting所作,如果转载或使用请标明具体出处!
 **/
@Data
@ApiModel(description = "职员对象")
public class EmployeeVo {
    @ApiModelProperty("id")
    private Long id;
    // 名字
    @ApiModelProperty("姓名")
    // @NotEmpty(message = "用户名不能为空")
    private String name;
    //
    // 级别-枚举（1-总经办，2-研发中心，3-业务中台，0-普通成员）
    @ApiModelProperty("级别")
    @ModelPropertyEnum(dictEnum = LevelEnum.class)
    private Integer level;

    //  @Transform(transformer = EnumTransformer.class)
    //  @Transform(from = "classLeader", transformer = EnumTransformer.class)
    @TransformEnum(LevelEnum.class)
    private String levelName;

    // 部门-需通过部门信息进行转换（sys_dept表根据id查询name）
    private Long deptId;
    private String deptName;

    // 性别-数据字典表（0-男，1-女）
    private Integer sex;
    // @TransformDict(group = "sex")
    private String sexName;

    // 团队人员
    @Transform
    private List<EmployeeVo> teams;
    // 直属领导
    @Transform
    private EmployeeVo leader;
}